/**
@author		Jong Min, Lee
@date		  10/01/2014
@breif		dicom frame class

copyright(c) Tae Young Soft. All right reserved. 2014
*/
#include "stdafx.h"
#include "Taurus_DcmData/DcmFrame.h"

#include "Taurus_DcmData/IFrameInfo.h"
#include "Taurus_DcmData/DcmInstance.h"

CDcmFrame::CDcmFrame()
{
  init();
}

CDcmFrame::~CDcmFrame()
{
  destroy();
}

void CDcmFrame::init()
{
  m_theParent = nullptr;
}

void CDcmFrame::destroy()
{
}

DWORD CDcmFrameProducer::produce(IFrameInfo& frameInfo, 
                                 CDcmInstance* parent, 
                                 CDcmFrame*& outFrame)
{
  CDcmFrame* newFrame = nullptr;
  _TRY_ALLOC(newFrame, CDcmFrame);
  if(newFrame == nullptr) return ERROR_NOT_ENOUGH_MEMORY;

  newFrame->m_theParent = parent;

  outFrame = newFrame;

  return ERROR_SUCCESS;
}